<template>
	<view class="container">
		<view class="icon">
			<image src="../../static/img/success.png" mode=""></image>
		</view>
		<view class="tip">
			支付成功
		</view>
		<view>
			<navigator v-if="info_done===1" url="../index/index" open-type="switchTab"  class="back" hover-class="none">
				返回首页
			</navigator>
			<navigator v-else url="../my/set/index"  class="back" hover-class="none">
				完善个人信息
			</navigator>
		</view>
		
		
	</view>
</template>

<script>
	export default{
		data(){
			return{
				info_done:1, //1完成，0未完成
				token:""
			}
		},
		created() {
			uni.getStorage({
				key: 'user_info',
				success: (res) => {
					this.token = res.data.token;
					this.$request('/api/wxapp/apply/userInfoDone',{
						"token":this.token
					}).then(res=>{
						console.log(res)
						if(res.code===1){
							this.info_done = res.data.info_done;
						}
					})
				},
				fail() {
					uni.redirectTo({
						url: '../login/auth'
					});
				}
			});
			
		}
	}
</script>

<style scoped lang="scss">
	.container{
		overflow: hidden;
	}
	.icon{
		width: 244px;
		height: 205px;
		margin: 100px auto 34px auto;
		image{
			width: 244px;
			height: 205px;
		}
	}
	.tip{
		font-size: 30px;
		font-family: SourceHanSansCN-Normal, SourceHanSansCN;
		color: #333333;
		text-align: center;
	}
	.back{
		width: 670rpx;
		height: 96rpx;
		line-height: 96rpx;
		background: linear-gradient(90deg, #ABE8C2 0%, #94E6DA 100%);
		border-radius: 48rpx;
		font-size: 18px;
		color: #FFFFFF;
		text-align: center;
		margin: 140rpx auto 0 auto;
	}
</style>
